//
//  Producto.m
//  ProyectoMoviTiendas
//
//  Created by Daniel Paez on 3/6/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "Producto.h"

@implementation Producto

@synthesize imagen,nombre,items;

- (id)init
{
    self = [super init];
    if (self) {
        items = [[NSMutableArray alloc] init];
    }
    return self;
}

- (void) encodeWithCoder:(NSCoder*) coder
{
    // imagen,nombre,items
    
    
    [coder encodeObject:[self nombre] forKey:@"nombre"];
    [coder encodeObject:[self imagen] forKey:@"imagen"];
    [coder encodeObject:[self items] forKey:@"items"];
    //    [coder encodeFloat:[self strokeWidth] forKey:@"stroke_width"];
}


- (id) initWithCoder:(NSCoder*) coder
{
    //[self init];
        self = [super init];
    self.nombre = [coder decodeObjectForKey:@"nombre"];
    self.imagen = [coder decodeObjectForKey:@"imagen"];
    self.items = [coder decodeObjectForKey:@"items"];    
    //[self setStrokeWidth:[coder decodeFloatForKey:@"stroke_width"]];
    
    return self;
}

@end
